home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / srcuc.zip / POSIXTYP.H < prev    next >
C/C++ Source or Header  |  1992-02-27  |  3KB  |  138 lines

  1. /* -*-C-*-
  2.  
  3. $Header: /scheme/src/microcode/RCS/posixtype.h,v 1.5 1992/02/27 18:41:09 mhwu Exp $
  4.  
  5. Copyright (c) 1990-91 Massachusetts Institute of Technology
  6.  
  7. This material was developed by the Scheme project at the Massachusetts
  8. Institute of Technology, Department of Electrical Engineering and
  9. Computer Science.  Permission to copy this software, to redistribute
  10. it, and to use it for any purpose is granted, subject to the following
  11. restrictions and understandings.
  12.  
  13. 1. Any copy made of this software must include this copyright notice
  14. in full.
  15.  
  16. 2. Users of this software agree to make their best efforts (a) to
  17. return to the MIT Scheme project any improvements or extensions that
  18. they make, so that these may be included in future releases; and (b)
  19. to inform MIT of noteworthy uses of this software.
  20.  
  21. 3. All materials developed as a consequence of the use of this
  22. software shall duly acknowledge such use, in accordance with the usual
  23. standards of acknowledging credit in academic research.
  24.  
  25. 4. MIT has made no warrantee or representation that the operation of
  26. this software will be error-free, and MIT is under no obligation to
  27. provide any services, by way of maintenance, update, or otherwise.
  28.  
  29. 5. In conjunction with products arising from the use of this material,
  30. there shall be no use of the name of the Massachusetts Institute of
  31. Technology nor of any adaptation thereof in any advertising,
  32. promotional, or sales literature without prior written consent from
  33. MIT in each case. */
  34.  
  35. #ifndef SCM_POSIXTYPE_H
  36. #define SCM_POSIXTYPE_H
  37.  
  38. #ifdef _POSIX
  39.  
  40. #include <sys/types.h>
  41. #include <sys/times.h>
  42. #include <termios.h>
  43.  
  44. #else /* not _POSIX */
  45.  
  46. #ifdef _UNIX
  47. #include <sys/types.h>
  48.  
  49. #if defined(_HPUX) && (_HPUX_VERSION == 65)
  50. #define _MODE_T
  51. #define _NLINK_T
  52. #define _SIZE_T
  53. #define _OFF_T
  54. #endif
  55.  
  56. #ifdef _BSD
  57. #define _UID_T
  58. #define _SIZE_T
  59. #define _OFF_T
  60. #endif
  61.  
  62. #if defined(_SUNOS4) && defined(__sys_stdtypes_h)
  63. #define _MODE_T
  64. #define _NLINK_T
  65. #define _PID_T
  66. #define _CLOCK_T
  67. #define _TIME_T
  68. #define _SIZE_T
  69. #define _OFF_T
  70. #define _CC_T
  71. #endif
  72.  
  73. #ifdef apollo
  74. #define _MODE_T
  75. #define _NLINK_T
  76. #define _PID_T
  77. #define _OFF_T
  78. #endif
  79.  
  80. #endif
  81.  
  82. #ifndef _MODE_T
  83. #define _MODE_T
  84. typedef unsigned short mode_t;
  85. #endif
  86.  
  87. #ifndef _NLINK_T
  88. #define _NLINK_T
  89. #ifndef _ULTRIX
  90. typedef short nlink_t;
  91. #endif
  92. #endif
  93.  
  94. #ifndef _PID_T
  95. #define _PID_T
  96. typedef long pid_t;
  97. #endif
  98.  
  99. #ifndef _UID_T
  100. #define _UID_T
  101. #ifdef _SYSV
  102. typedef unsigned short uid_t;
  103. typedef unsigned short gid_t;
  104. #else
  105. typedef short uid_t;
  106. typedef short gid_t;
  107. #endif
  108. #endif
  109.  
  110. #ifndef _CLOCK_T
  111. #define _CLOCK_T
  112. typedef unsigned long clock_t;
  113. #endif
  114.  
  115. #ifndef _TIME_T
  116. #define _TIME_T
  117. typedef long time_t;
  118. #endif
  119.  
  120. #ifndef _SIZE_T
  121. #define _SIZE_T
  122. typedef unsigned int size_t;
  123. #endif
  124.  
  125. #ifndef _OFF_T
  126. #define _OFF_T
  127. typedef unsigned int off_t;
  128. #endif
  129.  
  130. #ifndef _CC_T
  131. #define _CC_T
  132. typedef unsigned char cc_t;
  133. #endif
  134.  
  135. #endif /* not _POSIX */
  136.  
  137. #endif /* SCM_POSIXTYPE_H */
  138.